<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
    
</head>
<body>

<!--MESSAGE-->
<? if (isset($message) && $message!=""){ ?>
	<?=$message?><br /><br />
<? } ?>  


<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF">

<!--HEADER-->
<table border="0" cellpadding="0" cellspacing="0" width="630" style="border-bottom-style:solid; border-bottom-color:#666666; border-bottom-width:1px;">
  <tr>
    <td align="left" valign="top" bgcolor="#FFFFFF" style="padding-left:20px;padding-right:20px;padding-bottom:20px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:0px;">
      <tr>
        <td valign="top" style=" text-transform:uppercase;font-family:Arial, Helvetica, sans-serif;font-size:18px;color:#333333;font-weight:bold; padding-right:40px; padding-top:20px;"><a href="<?=$link?>"><img src="<?=base_url()?>assets/website/images/deferranti-logo.gif" alt="De Ferranti" width="293" height="38"></a></td>
      </tr>
    </table>
        </td>
  </tr>
</table>

<!--CONTENT-->
  <table border="0" cellpadding="0" cellspacing="0" width="630">
<tr>
  <td align="left" valign="top" bgcolor="#FFFFFF" style="padding:20px;">
  
  <!--CONTENT HEADER-->
  <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:0px;">
      <tr>
        <td valign="top" style="font-family:Arial, sans-serif;font-size:29px;margin:0;color:#333333;font-weight:bold;line-height:1em;padding-right:40px;padding-bottom:5px;">Wish List</td>
      </tr>
    </table>
	
	<!--CONTENT TEXT WITH 0PX TOP MARGIN-->
    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:0px;">
      <tr>
        <td valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:16px;color:#333333;font-weight:light; padding-bottom:20px;"><p>This wish list was sent to you by <?=$user['FirstName_UsersDetails']." ".$user['LastName_UsersDetails']?> from the <a href="http://deferranti.com">De Ferranti</a> website</p>
            </td>
      </tr>
    </table>


	<? 
	$w=0;
	foreach ($wishlists as $list) { ?>
        <!--CONTENT SUB-HEADER WITH UNDERLINE-->
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:<?=($w>0)?"10px":"0";?>;border-bottom-style:dashed; border-bottom-color:#666666; border-bottom-width:1px;">
          <tr>
            <td valign="top" style="font-family:Arial, sans-serif;font-size:16px;margin-top:0;color:#333333;font-weight:bold;line-height:20px;padding-bottom:5px;"><?=$list['name']?> :</td>
          </tr>
        </table>      
        
        <? if (empty($list["items"])) { ?>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
              <tr>
                <td width="183" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:15px;color:#333333;font-weight:light; padding-bottom:0px;">
                <?=$this->lang->line('WishlistEmpty');?>
                </td>
              </tr>
            </table>        
        <? } ?>        
        
		<? $i=0;
        foreach ($list["items"] as $product) { ?>    
        
                <? if (is_int($i/3)) { // position 1 ?>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
              <tr>
                <? } ?>
            
                <td width="183" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:15px;color:#333333;font-weight:light; padding-bottom:0px;"><img src="<?=thumbnail(base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$product["image"])?>" width="106" height="66" style="padding-bottom:10px;"><br>
                          <strong><?=$product["title"]?></strong><br>
                <?
                $trim_length = 200-strlen($product['title']);
                if ($trim_length <= 40) $trim_length = 40;
                $product['text'] = trim_string(strip_tags($product['text']), $trim_length, "...");
                ?>                  
                          
                          <?=$product["text"]?> <a href="<?=site_url('products/view/'.$product["id"])?>" style="color:#333333">more...</a> </td>    
        
                <? if (is_int(($i)/3)) {  // position 1 ?>
                <td width=​"20" valign=​"top" style=​"font-family:​Arial, Helvetica, sans-serif;​font-size:​11px;​color:​#333333;​font-weight:​light;​">​&nbsp;​</td>​  
                <? } else if (is_int(($i+2)/3)) {  // position 2 ?>
                <td width=​"20" valign=​"top" style=​"font-family:​Arial, Helvetica, sans-serif;​font-size:​11px;​color:​#333333;​font-weight:​light;​">​&nbsp;​</td>​  
                <? } else if (is_int(($i+1)/3)) {  // position 3 ?>
              </tr>
            </table>
                <? } ?>
    
        <? 
        $i++;
        } ?>       
	
      	<? if (is_int(($i+2)/3)) { // position 1 ?>    
 		<td width="183" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:15px;color:#333333;font-weight:light; padding-bottom:0px;"></td>
	    <td width=​"20" valign=​"top" style=​"font-family:​Arial, Helvetica, sans-serif;​font-size:​11px;​color:​#333333;​font-weight:​light;​">​&nbsp;​</td>
        <td width="183" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:15px;color:#333333;font-weight:light; padding-bottom:0px;"></td>​          
      </tr>
    </table>
		<? } else if (is_int(($i+1)/3)) { // position 2 ?>            
      <td width="183" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:15px;color:#333333;font-weight:light; padding-bottom:0px;"></td>​          
      </tr>
    </table>
      	<? } ?>      
    
	<?
	$w++;
	} ?>	
 
 
 </td>
</tr>
</table>   
	

<!--FOOTER-->
  <table width="630" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-top-style:solid; border-top-color:#666666; border-top-width:1px;border-bottom-style:solid; border-bottom-color:#666666; border-bottom-width:0px;">
    <tr>
      <td align="left" valign="top" style="text-align:left; line-height:15px;padding-right:10px;padding-left:20px;padding-bottom:20px;padding-top:20px;font-family:Arial, Helvetica, sans-serif;font-size:11px;color:#000000">
			<?=$this->lang->line('FooterContacts');?>
                <p></p>
		</td>
      </tr>
</table>
  </td>
</tr>
</table>
</body>
</html>